package com.cn.service.server.bc.Impl;


import com.cn.mapper.dao.db1.bc.AssistDao;
import com.cn.service.server.bc.AssistServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cn.bean.pojo.bc.Assist;
import com.cn.bean.pojo.bc.AssistList;
import java.math.BigDecimal;
import java.util.List;
@Service
public class AssistServerImpl implements AssistServer {
    private final AssistDao assistDao;

    @Autowired(required=false)
    public AssistServerImpl(AssistDao assistDao) {
        this.assistDao = assistDao;
    }

    @Override
    public List<Assist> selectAssist(int limit, int page, String cpyt, String fabh) {
        List<Assist> assists = assistDao.selectAssist(limit, page, cpyt, fabh);
        return assists;
    }

    @Override
    public int getAssist() {
        int assist = assistDao.getAssist();
        return assist;
    }

    @Override
    public int getAssistList() {
        return assistDao.getAssistList();
    }

    @Override
    public List<Assist> selectFabh(String fabh) {

        return assistDao.selectFabh(fabh);
    }

    @Override
    public List<AssistList> selectAssistList(int id) {
        List<AssistList> assistLists = assistDao.selectAssistList(id);
        return assistLists;
    }


    @Override
    public int addAssist(int id, String fabh, String djrq, int djzt, String cslx, String cpyt, String kh, String cz, BigDecimal hd, BigDecimal kd, String csfs, String dwjs, BigDecimal ddsl, String ywy, String ywygh, String ywbm, String ywbmgh, String bz, String zdr, String zdbm, String zdsj, String shr, String shsj, String xgr, String xgbm,String bzfabh,String bzfamc) {
        int i = assistDao.addAssist(id, fabh, djrq, djzt, cslx, cpyt, kh, cz, hd, kd, csfs, dwjs, ddsl, ywy, ywygh, ywbm, ywbmgh, bz, zdr, zdbm, zdsj, shr, shsj, xgr, xgbm,bzfabh,bzfamc);
        return i;
    }

    @Override
    public int addAssistList(int id, String wlbm, String wlmc, String wlgg, String jldw, BigDecimal bzsl, BigDecimal bzdj, BigDecimal bzje, BigDecimal ddsl, BigDecimal zs, BigDecimal je, String bzList, String csfs, String dwjs, int parentBh) {
        int i = assistDao.addAssistList(id, wlbm, wlmc, wlgg, jldw, bzsl, bzdj, bzje, ddsl, zs, je, bzList, csfs, dwjs, parentBh);
        return i;
    }

    @Override
    public int updateAssist(String cslx, String cpyt, String kh, String cz, BigDecimal hd, BigDecimal kd, String csfs, String dwjs, String bz, String xgr, String xgbm, String fabh, BigDecimal ddsl, String bzfabh, String bzfamc, String xgsj) {
        return assistDao.updateAssist(cslx,cpyt,kh,cz,hd,kd,csfs,dwjs,bz,xgr,xgbm,fabh,ddsl,bzfabh,bzfamc,xgsj);
    }

    @Override
    public int deleteAssistList(int id) {
        int i = assistDao.deleteAssistList(id);
        return i ;
    }

    @Override
    public List<Assist> selectAst(String fabh) {
        List<Assist> assists = assistDao.selectAst(fabh);
        return assists;
    }

    @Override
    public Assist selectDjzt(int id) {
        Assist assist = assistDao.selectDjzt(id);
        return assist;
    }

    @Override
    public int deleteAssist(int id) {
        int i = assistDao.deleteAssist(id);
        return i;
    }

    @Override
    public int intupDateAuto0(int id, String shr, String shsj, String shbm) {
        return assistDao.intupDateAuto0(id,shr,shsj,shbm);
    }

    @Override
    public int intupDateAuto1(int id, String shr, String shsj, String shbm) {
        return assistDao.intupDateAuto1(id,shr,shsj,shbm);
    }
}
